
/**
 * Class CSC-421
 * Instructor: Wilfredo Marrero
 * @author Hyrum Taft, Don Evett
 * @version 6
 * A solution to homework problem 2.
 * Input: The ArrayList data will contain 1 or more Strings
 * Output: An ArrayList containing all the possible orderings of the "three" words. 
 * Each string will be one possible ordering of the input words, with commas seperating the words.
 * The order in which the string appear in the ArrayList is irrevelant as long as there are no repetitions,
 * all orderings are present, and each String has the proper format (a comma seperated list of words)
 */

import java.util.ArrayList;



public class Solution {

	
	/**
	 * @param data will contain 1 or more Strings
	 * @return An ArrayList containing all the possible orderings of the words found in data input parameter
	 */
    public static ArrayList<String> solve(ArrayList<String> data)
    {	
    	Permutation p = new Permutation();
    	
    	p.OrderedPermutationsNoRepeats(data,0,data.size());
    	
    	return p.GetOutput();
    }
    
    
    
}
